package cn.simple.manager.Repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import cn.simple.manager.todo.User;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface UserResponsitory extends JpaRepository<User, String> {

    @Query(value = "Select * from Users where username=:uniqueId or mobile=:uniqueId ",nativeQuery = true)
    User getByNameOrMobile(@Param("uniqueId") String uniqueId);

}
